<template>
	<view class="margin-tb">
		<u-cell-group>
			<u-cell-item icon="home" :title="company.aliasName" :arrow="true" arrow-direction="right" @click="navTo('org-list?parentId=' + company.id)">
				<view slot="label">
					<view>全称：{{ company.orgName }}</view>
					<view>类型：{{ company.orgTypeName }}</view>
					<view>编码：{{ company.orgCode }}</view>
				</view>
			</u-cell-item>
			<u-cell-item icon="trash" title="独立用户" :arrow="true" arrow-direction="right">
				<view slot="label"><view>编码：NON_GROUP</view></view>
			</u-cell-item>
		</u-cell-group>
		<u-loadmore status="nomore" bg-color="" class="padding" />
	</view>
</template>

<script>
export default {
	onLoad: function(option) {
		this.getCompany();
	},
	data() {
		return {
			company: {}, // 公司
		};
	},
	methods: {
		navTo: function(url) {
			uni.navigateTo({
				url: url
			});
		},
		getCompany: function() {
			this.$request.get(
				`/admin/sys/org/getCompany`,
				{},
				res => {
					this.company = res.data;
				},
				false,
				true,
				true
			);
		}
	}
};
</script>

<style lang="scss" scoped></style>
